#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QListWidgetItem>
#include <QKeyEvent>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void paint_new_table(QString currentText);

    void get_all_table();

    void read_odbc_setting();

    void backup_operating_table();

private slots:
    void on_start_connect_clicked();

    void on_table_list_currentTextChanged(const QString &currentText);

    void on_create_table_clicked();

    void on_data_box_currentTextChanged(const QString &arg1);

    void on_constraint_box_currentTextChanged(const QString &arg1);

    void on_add_arrange_clicked();

    void on_delete_arrange_clicked();

    void on_new_table_info_cellClicked(int row, int column);

    void on_exit_create_page_clicked();

    void on_add_table_clicked();

    bool primary_key_exist();

    void on_table_index_tabBarClicked(int index);

    void on_delete_table_clicked();

    void on_clear_table_clicked();

    void on_update_table_clicked();

    void on_table_index_currentChanged(int index);

    void on_table_list_itemDoubleClicked(QListWidgetItem *item);

    void on_read_odbc_ini_clicked();

    void on_new_tunple_clicked();

    void on_writing_table_clicked(const QModelIndex &index);

    void on_delete_choose_clicked();

    void on_upgrade_change_clicked();

    void on_exit_upgrade_clicked();

    void on_db_botton_clicked();

    void on_start_sql_clicked();

    void on_sql_page_back_clicked();

    void on_actioncsv_triggered();

    void on_action_og_db_export_triggered();

    void on_actionxls_triggered();

    void on_actionxlsx_triggered();

    void on_action_og_db_import_triggered();

    void on_action_help_triggered();

    void on_action_setting_triggered();

    void on_setting_page_back_clicked();

    void on_open_dir_stateChanged(int arg1);

    void on_actionbug_report_triggered();

    void on_fresh_table_clicked();

    void on_backup_table_stateChanged(int arg1);

    void on_backup_dir_editingFinished();

    void on_choose_backup_dir_clicked();

    void on_pushButton_clicked();

    void on_action_build_SQL_triggered();

    void on_action_read_SQL_triggered();

    void on_sql_edit_textChanged();

    void keyPressEvent(QKeyEvent* event);

    void on_SaveSQLButton_clicked();

    void on_action_node_manager_triggered();

    void on_NodeListDetail_cellClicked(int row, int column);

    void on_LeaveNodeManager_clicked();

    void on_OpenNode_clicked();

    void on_RestartNode_clicked();

    void on_StopNode_clicked();

    void on_action_user_manager_triggered();

    void on_UserTable_cellClicked(int row, int column);

    void on_UserNameInput_textChanged(const QString &arg1);

    void on_UserPwdInput_textChanged(const QString &arg1);

    void on_AddNewUser_clicked();

    void on_DeleteUser_clicked();

    void on_LeaveUserManager_clicked();

private:
    Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
